//异步并发
setTimeout(()=>{
    console.log("setTimeout");
})
var p = new Promise((resolve,rejec)=>{
    console.log("promise");
    var inner = new Promise((res,rejec)=>{
        console.log('inner');
        res();
    })
    inner.then(r=>{console.log("inner executed.")});
    resolve();
});
p.then(r=>{console.log("promise executed.")});

var p1 = new Promise((resolve,reject)=>{
    console.log("promise1.");
    resolve();
});
p1.then(r=>{
    console.log("promise1 executed.");
});

